If there is no desktop window, getDesktopClone() returns null.
In that case, we know that no animation is needed.
Fixes a regression from
b97f3a9ecf52183e86506af622a08eaa7e3846bb
https://bugzilla.gnome.org/show_bug.cgi?id=723523
},
fadeOutDesktop: function() {
- if (!this._desktopFade.get_n_children())
- this._desktopFade.add_child(this._getDesktopClone());
+ if (!this._desktopFade.get_n_children()) {
+ let clone = this._getDesktopClone();
+ if (!clone)
+ return;
+
+ this._desktopFade.add_child(clone);
+ }
this._desktopFade.opacity = 255;
this._desktopFade.show();